#!/bin/bash
URL=https://github.com/alibaba/Sentinel/releases/download/1.8.1/sentinel-dashboard-1.8.1.jar

SENTINEL_HOME=/opt/module/sentinel-dashboard
JAR_FILE=$SENTINEL_HOME/`basename $URL`

# 不存在则下载
if [ ! -f "$JAR_FILE" ]; then
    mkdir -p $SENTINEL_HOME
    # wget 下载 指定目录大P
    wget $URL -P $SENTINEL_HOME
fi

java -Dserver.port=8080 \
    -Dcsp.sentinel.dashboard.server=localhost:8080 \
    -Dproject.name=sentinel-dashboard \
    -jar $JAR_FILE

# 用户名，密码sentinel
